<!DOCTYPE html>
<html lang="en" class="no-js" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
  <head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>哗啦啦</title>
    <link th:href="@{/plugins/bootstrap/css/bootstrap.min.css}" href="plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" type="text/css" th:href="@{/frontend_css/style.css}" href="style.css"/>
    <link rel="stylesheet" type="text/css" th:href="@{/frontend_css/base.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/frontend_css/hualala-style.css}"/>
    <!--<script th:src="@{/plugins/jquery-1.11.0.min.js}" src="jquery-1.11.0.min.js"></script>-->
    <script th:src="@{/scripts/jquery-1.8.2.min.js}"></script>
	<script type="text/javascript" th:src="@{/scripts/js.js}"></script>
    <!--<link rel="stylesheet" type="text/css" th:href="@{/frontend_css/base.css}"/>-->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script type="text/javascript">
	    function refresh(obj) {
	        obj.src = "/verificationCode?"+Math.random();
	    }
	    
	    function index_login(){
	    	$.ajax({
	    		url:'/form_login',
	    		data:$('#login_form').serialize(),
	    		success:function(data){
	    			if(data =='true'){
	    				location.href ="/index";
	    			}else{
	    				if(data=='1'){
	    					alert('验证码错误');
	    				}else if(data =='2'){
	    					alert('用户已冻结，请联系客服！');
	    				}else if(data == '3'){
	    					alert('用户名或者密码错误');
	    				}else{
	    					alert('未知错误，请联系客服');
	    				}
	    			}
	    		}
	    	});
	    }
	    </script>
   
  </head>
  <body>
    <div class="container-fluid">
	<div class="row-fluid header">
		<div class="col-md-12">
			<div class="row-fluid header-top">
				<div class="col-md-12 pull-right">
					<th:block th:if="${user == null}">
						<script>
							var isrem = getCookie('remember');
				            if (isrem == 1) {
				                $("#idOrEmail").attr("value", getCookie("username"));
				                $("#password").attr("value", getCookie("password"));
				                $("#remember").attr("checked", "checked");
				             }
						</script>
						<form id="login_form" class="form-inline" role="form" style="margin-top:5px;float:right;">
						  <div class="form-group">
						    <label for="idOrEmail">用户名</label>
						    <input class="form-control" id="idOrEmail" name="idOrEmail" placeholder="用户名"/>
						  </div>
						  <div class="form-group">
						    <label for="password">密码</label>
						    <input type="password" class="form-control" name="password" id="password"/>
						  </div>
						  <div class="form-group">
						    <label for="checkcode">验证码</label>
						    <input class="form-control" name="checkcode" id="checkcode" placeholder="验证码" style="width:68px;"/>
						  </div>
						  <div class="form-group">
						    <label class="sr-only" for="examplecheck">验证码</label>
						    <img height="25" onclick="javascript:refresh(this);" id="examplecheck" th:src="@{/verificationCode}" src="check.png" />
						  </div>
						  <div class="checkbox">
						    <label>
						      <input type="checkbox" id="remember" value="1" name="rememeber"/> 记住登陆
						    </label>
						  </div>
						  <button type="button" onclick="index_login()" class="btn btn-danger">登陆</button>
						  <button type="button" class="btn btn-link" style="margin-left:10px;">免费注册</button>|
						  <button type="button" class="btn btn-link">忘记密码</button>|
						  <button type="button" class="btn btn-link">代理列表</button>|
					  	  <button type="button" class="btn btn-link">帮助中心</button>
						</form>							
					</th:block>
					<th:block th:if="${user !=null}">
						<span>
							您好！<span style="color:red;" th:text="${user.userID}"></span>,
							ID:<span style="color:green;" th:text="${user.userID}"></span>,
							您的余额:<span class="money_bg" th:text="${user.coin}"></span></span>
							<a href="/logout" class="btn btn-link">退出</a>
							<button type="button" class="btn btn-link">代理列表</button>|
					  		<button type="button" class="btn btn-link">帮助中心</button>
					</th:block>
				</div>
				<div class="col-md-12" style="border-top:1px solid #ccc;height:1px;margin-top:1px;"></div>
			</div>			
			<div class="row-fluid header-center">
				<div class="col-md-2">
				2
				</div>
				<div class="col-md-8">
					<div class="col-md-12" style="height:123px;"></div>
					<div class="col-md-12" style="height:80px;">
						<ul id="nav" class="nav nav-pills nav-justified" role="tablist">
							
							<li role="presentation">
								<a th:href="@{/fgame/1/index}">
									<button class="btn btn-link">
										<img th:src="@{/images/brand.png}" src="brand.png" width="50px;"/>
									</button>
								</a>
							</li>
							<li role="presentation">
								<a th:href="@{/fgame/1/index}">
								<button type="button" class="btn btn-link">
									<img th:src="@{/images/brand.png}" src="brand.png" width="50px;"/>
								</button>
								</a>				
							</li>
							<li role="presentation">
								<a th:href="@{/fgame/1/index}">
								<button type="button" class="btn btn-link">
									<img th:src="@{/images/brand.png}" src="brand.png" width="50px;"/>
								</button>	
								</a>			
							</li>
							<li role="presentation">
							<a th:href="@{/fgame/1/index}">
								<button type="button" class="btn btn-link">
									<img th:src="@{/images/brand.png}" src="brand.png" width="50px;"/>
								</button>
							</a>				
							</li>
							<li role="presentation">
							<a th:href="@{/fgame/1/index}">
								<button type="button" class="btn btn-link">
									<img th:src="@{/images/brand.png}" src="brand.png" width="50px;"/>
								</button>		
								</a>		
							</li>
							
						</ul>
					</div>									
				</div>
				<div class="col-md-2">
				4
				</div>
			</div>
			<div class="col-md-12" style="height:50px;">
				<nav class="navbar navbar-default" style="height:30px;" role="navigation">
					<div class="container-fluid" >
						<div class="navbar-header">
							<a class="navbar-brand" href="#"><img th:src="@{/images/brand.png}" src="brand.png" width="20px;"/></a>
						</div>
						<div id="bs-example-navbar-collapse-4" class="collapse navbar-collapse">
							<p class="navbar-text">Signed in as Mark Otto</p>
						</div>
					</div>
				</nav>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-md-12 block"></div>
	</div>
	<div layout:fragment="content" class="row" style="width:1000px;margin:0 auto;">
		
	</div>
	
	<div class="row">
		<div class="col-md-12 block"></div>
	</div>
	<hr/>
	<div class="row-fluid" >
		<div class="col-md-12">
			<p class="text-center">
				<b style="color:#0066FF;">客服QQ</b><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=2694267041&amp;site=qq&amp;menu=yes">2694267041</a>
            &nbsp;&nbsp;&nbsp;QQ群：<strong><a target="_blank" href="http://shang.qq.com/wpa/qunwpa?idkey=fc39a9d164576629c0bb41dd76c0f963947e39fa35f0f8563c6012a9f5c62861">308799223</a></strong> 
			</p>
			<p class="text-center">
				<a href="http://www.miibeian.gov.cn/" target="_blank">苏ICP备14026719号-7</a> Copyright © shenle28.com。All Rights Reserved. 
			</p>			         
	    </div>
		
	</div>
</div>
    <script th:src="@{/plugins/bootbox/bootbox.min.js}" src="bootstrap.min.js"></script>
    <script th:src="@{/scripts/unslider.js}" type="text/javascript" src="unslider.js"></script>
    <script type="text/javascript">
    	$(function() {
		    if(window.chrome) {
				$('.banner li').css('background-size', '100% 100%');
			}

			var unslider = $('.banner').unslider({
				arrows: true,
				fluid: true,
				dots: true
			});
			$('.unslider-arrow').click(function() {
		        var fn = this.className.split(' ')[1];
		        //  Either do unslider.data('unslider').next() or .prev() depending on the className
		        unslider.data('unslider')[fn]();			
			});
		});
    </script>
  </body>
</html>
